<?php

abstract class Bcms_Resource_Field_Abstract
{
	/**
	 * 
	 */
	protected $_field;

	/**
	 * Tipo de campo
	 * 
	 * @var string Tipo de campo
	 */
	protected $_type = null;
	
	public function __construct($field)
	{
		$this->_field = $field;
	}
	
	public function setType($type)
	{
		$this->_type = $type;
	}

	public function getType()
	{
		if(!isset($this->_type) && isset($this->_field['type'])){
			$this->setType($this->_field['type']);
			return $this->_type;
		}
		
		return $this->_type;
	}
}